package com.sjb.strategy;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: 有点儿意思
 * @Description:
 */
public class TestHandlerStrategy {

    public static void main(String[] args) {
        Order weChat = new Order("1", "weChat");
        Order iPay = new Order("2", "IPay");

        StrategyManager weChatManager = new StrategyManager(new WeChatStrategy());
        String weChatString = weChatManager.handlerOrder(weChat);
        System.out.println(weChatString);

        StrategyManager IPayManager = new StrategyManager(new IPayStrategy());
        String IPay = IPayManager.handlerOrder(iPay);
        System.out.println(IPay);
    }
}
